const BaseRoutes = require("./baseRoutes");
const deptController = require("../controllers/deptController");

const deptRoutes = new BaseRoutes("/depts", deptController);

// 前置扩展路由写法
// deptRoutes.router.get("/:id/users", deptController.getUsersByDeptId);

/**
 * @swagger
 * /depts:
 *   get:
 *     tags:
 *       - Departments
 *     summary: 获取部门列表
 *     description: 获取所有部门信息
 *     responses:
 *       200:
 *         description: 部门列表
 */
const deptRouteInstance = deptRoutes.registerRoutes();

// 后置扩展路由写法
// deptRouteInstance.get("/:id/users", deptController.getUsersByDeptId);
// deptRouteInstance.get("/:id/depts", deptController.getDeptsByDeptId);

module.exports = deptRouteInstance;
